using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class RD_ClearRecordsMap : EntityTypeConfiguration<RD_ClearRecords>
    {
        public RD_ClearRecordsMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Tables)
                .HasMaxLength(50);

            this.Property(t => t.Section)
                .HasMaxLength(50);

            this.Property(t => t.SectionCode)
                .HasMaxLength(50);

            this.Property(t => t.TablesCode)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("RD_ClearRecords");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.Tables).HasColumnName("Tables");
            this.Property(t => t.LastUser).HasColumnName("LastUser");
            this.Property(t => t.LastDate).HasColumnName("LastDate");
            this.Property(t => t.Selected).HasColumnName("Selected");
            this.Property(t => t.Section).HasColumnName("Section");
            this.Property(t => t.Enabled).HasColumnName("Enabled");
            this.Property(t => t.SectionCode).HasColumnName("SectionCode");
            this.Property(t => t.TablesCode).HasColumnName("TablesCode");
            this.Property(t => t.Order).HasColumnName("Order");
        }
    }
}
